package com.zhuanzhuan.hero.user.init;

import com.bj58.zhuanzhuan.arch.prometheus.client.MetricsExporter;
import lombok.extern.slf4j.Slf4j;
import org.springframework.context.ApplicationListener;
import org.springframework.context.event.ContextRefreshedEvent;
import org.springframework.stereotype.Component;

/**
 * @Created by lizhihao
 * @Date 2023/9/12 16:40
 * @Description
 */
@Slf4j
@Component
public class ServiceInit implements ApplicationListener<ContextRefreshedEvent> {

    @Override
    public void onApplicationEvent(ContextRefreshedEvent event) {
        log.info("ServiceInit start");
        MetricsExporter.start();
        log.info("ServiceInit end");
    }
}
